package cn.stronglink.asset.module.sys.department.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;

import cn.stronglink.asset.model.Department;
import cn.stronglink.asset.module.sys.department.vo.DepartmentTreeNodeVo;

public interface DepartmentMapper {
	
	public List<DepartmentTreeNodeVo> qryDepts();
	
	public List<DepartmentTreeNodeVo> qryRootDept();

	public void updateDept(Department dept);
	
	public void insertDept(Department dept);

	public Department qryDeptById(@Param("id")Long id);

	public List<Department> getDeptsByPid(Pagination page,@Param("pid")Long pid,@Param("name")String name);
	
	public void delDept(@Param("id")Long id);

	public int getChildDetpCount(@Param("id")Long id);

	public List<DepartmentTreeNodeVo> getChildList(@Param("pid") Long id);

}
